cmake_minimum_required(VERSION 2.6)

INCLUDE(CheckIncludeFiles)


PROJECT(DoQuMeasures)

SET(CMAKE_BUILD_TYPE Debug)

SET(CMAKE_CXX_FLAGS_DEBUG "-g")
# Set the library version 
SET(DoQuMeasures_MAJOR_VERSION 1)
SET(DoQuMeasures_MINOR_VERSION 0)
SET(DoQuMeasures_PATCH_VERSION 0)
SET(DoQuMeasures_VERSION "${DoQuMeasures_MAJOR_VERSION}.${DoQuMeasures_MINOR_VERSION}.${DoQuMeasures_PATCH_VERSION}")
SET(DoQuMeasures_LIBRARY_PROPERTIES ${DoQuMeasures_LIBRARY_PROPERTIES} VERSION "${DoQuMeasures_VERSION}" SOVERSION "${DoQuMeasures_MAJOR_VERSION}")


IF (NOT CMAKE_MODULE_PATH)
  SET(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/Modules" CACHE PATH "Path for CMake modules")
ENDIF()

SET(DoQuMeasures_HEADERS_DST_DIR "DoQuMeasures-${DoQuMeasures_MAJOR_VERSION}.${DoQuMeasures_MINOR_VERSION}/DoQuMeasures")

FIND_PACKAGE(ISE REQUIRED)



## for ${DoQuMeasures_major_minor}.pc.in
SET(major_minor "${DoQuMeasures_MAJOR_VERSION}.${DoQuMeasures_MINOR_VERSION}")
SET(DoQuMeasures_major_minor "DoQuMeasures-${DoQuMeasures_MAJOR_VERSION}.${DoQuMeasures_MINOR_VERSION}")
SET(prefix ${CMAKE_INSTALL_PREFIX})
SET(exec_prefix ${prefix})
SET(includedir ${exec_prefix}/include)
SET(libdir ${exec_prefix}/lib)
SET(VERSION ${girlTools_VERSION})
SET(PACKAGE_NAME DoQuMeasures)
SET(PACKAGE_API_VERSION "${major_minor}")


#FOREACH(DIR ${ISE_INCLUDE_DIRS})
#  SET(DoQuMeasures_EXTRA_CFLAGS "${ISE_EXTRA_CFLAGS} -I${DIR}")
#ENDFOREACH()
#SET(DoQuMeasures_EXTRA_CFLAGS "${ISE_EXTRA_CFLAGS} ${ISE_DEFINITIONS}")


# Pkg config 
SET(config-filename DoQuMeasures-${DoQuMeasures_MAJOR_VERSION}.${DoQuMeasures_MINOR_VERSION}.pc)
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/${config-filename}.in ${CMAKE_CURRENT_BINARY_DIR}/${config-filename})

INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${config-filename} DESTINATION lib/pkgconfig)

ADD_SUBDIRECTORY(DoQuMeasures)
#ADD_SUBDIRECTORY(tests)


